//
//  AppDelegate.swift
//  Sina
//
//  Created by 邹志华 on 15/10/27.
//  Copyright © 2015年 zzh. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?


    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        setupAppearance()
        

        print("启动account:\(UserAcoount.loadAccount())")
        //创建window
        window = UIWindow(frame: UIScreen.mainScreen().bounds)
        
        
        let tabbar = MainViewController()
        //?表示如果前面的变量有值,才会执行后面的代码
        window?.rootViewController = tabbar
        
               
        
        
        //主窗口显示
        window?.makeKeyAndVisible()
        return true
    }


    
    private func setupAppearance() {
        //设置导航栏按钮颜色.尽量早点写
    UINavigationBar.appearance().tintColor = UIColor.orangeColor()
    }
    
    
    
    
    
    
    

}

